package dreamCookGame;

import java.awt.image.BufferedImage;

public class ItemBehavior {
	int _x;
	int _y;
	String[] _stateImgNames;
	BufferedImage[] _states;
	int _state;	
	BufferedImage _img;
	
	public ItemBehavior(int x, int y, String[] stateImgNames) {
		_x = x;
		_y = y;
		_states = new BufferedImage[stateImgNames.length];
		_stateImgNames = stateImgNames;
		_state = 0;
	}
	
	public void loadResources(References reference) {
		_states  = reference.getImageArray(_stateImgNames[0]);
		_img = _states[0];
	}
	
	public void changeState(int state) {
		_state = state;
		_img = _states[state];
	}

}

